package Lianxi;

public class Student {
    private String name;
    private int age=18;
    private char gender='男';
    private String study;
    private String sleep;
    private String speak;

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public char getGender() {
        return gender;
    }
    public void setGender(char gender) {
        this.gender = gender;
    }
    public void study(){
        this.study=study;
    }
    public void sleep(){
        this.sleep=sleep;
    }
    public void speak(){
        this.speak=speak;
    }
    public void gm(){
        study="正在学习";
        sleep="正在睡觉";
        speak="正在说话";
    }
    public void showCenter(){

        name="张三";
        age=90;
        gender='女';
        if(age>=1&&age<=100){
            this.age=age;
        }
        if(gender=='男'){
            this.gender=gender;
        }else
            if(gender=='女'){
            gender='女';
        }
        System.out.println("姓名："+name+"\t年龄："+age+"\t性别："+gender);
    }

    public static void main(String[] args) {
        Student gm=new Student();
        gm.showCenter();
    }

}
